package com.csii.mobilebanking.user;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.telephony.SmsManager;

/**
 * 短信管理
 * @author Administrator
 *
 */
public class SmsMng {
	Context mContext;

	public SmsMng(Context context) {
		this.mContext = context;
	}

	public void sendSms(String msgNumber) {
		
		// 构建一取得default instance的SmsManager对象
		try {
			SmsManager smsManager = SmsManager.getDefault();
			Intent sentIntent = new Intent(GlobalConstant.SMS_SEND_ACTIOIN);
			PendingIntent pintent = PendingIntent.getBroadcast(mContext, 0,
					sentIntent, 0);
			smsManager.sendTextMessage(msgNumber, null,
					GlobalConstant.SMS_SEND_CONTENT, pintent, null);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
